<?php
  defined('_JEXEC') or die();
  jimport('joomla.application.component.model');
  require_once('base.php');
  
  class SeasonModelSeason extends BaseModel 
  {       
    var $_name        = "season";
    var $_table       = "#__pbny_seasons";
    
    function get_latest(){
    
      $sql  = "SELECT * FROM $this->_table ".
                    'ORDER BY start_date DESC limit 1';
      $result = $this->_get($sql);
      if($result)
        return $result[0];
        
      return $result;
    }

  }
?>
